<?php
/*
 * @Author: zeyudada
 * @Date: 2022-01-12 20:56:12
 * @LastEditTime: 2022-04-08 17:42:25
 * @Description: 验证码函数
 * @Q Q: zeyunb@vip.qq.com(1776299529)
 * @E-mail: admin@zeyudada.cn
 * 
 * Copyright (c) 2022 by zeyudada, All Rights Reserved. 
 */


session_start();

require_once __DIR__.'/../vendor/autoload.php';

use Gregwar\Captcha\CaptchaBuilder;

$captcha = new CaptchaBuilder(4);
$_SESSION['code'] = strtoupper($captcha->getPhrase());

header('Content-type: image/jpeg');

$captcha->build(150, 50)->output();
